package com.example.oss.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.oss.entity.Order;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface OrderMapper extends BaseMapper<Order> {


    @Select("select stu_id from `t_order` where stu_id = #{stuId}")
    Integer existStuId(int stuId);


    @Insert("insert into `t_order`(course_id, stu_id) values(#{courseId}, #{stuId})")
    int insertOrder(Order order);


}
